package com.inspect.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Constant {
	public static final String ADD = "ADD";
	public static final String REMOVE = "DELETE";
	public static final String EDIT = "UPDATE";
	
	//job name / trigger name
	public static final String defaultTriggerGroup = "inspectTrigger";
	public static final String defailtJobGroup = "inspectJob";
	
	public static final String CMD = "command";
	public static final String HOST_IP="HOST_IP";
	public static final String UNAME="UNAME";
	public static final String PWD="PWD";
	public static final String PORT="PORT";
	public static final String SID="SID";
	public static final String THRESHOLD="DEFAULT_SCRIPT";
	public static final String PRIVATE_THRESHOLD="PRIVATE_THRESHOLD";
	public static final String SCRIPT_NAME="SCRIPT_NAME";
	public static final String CRON_EXPRESSION="CRON_EXPRESSION";
	public static final String START_TIME="START_TIME";
	public static final String JOB_ID="JOB_ID";
	public static final String PLAN_ID = "PLAN_ID";
	public static final String SCRIPT_ID = "SCRIPT_ID";
	public static final String ASSET_CODE = "ASSET_CODE";
	
	public static void main(String[] args ) {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
		Date date = new Date();
		System.out.println(sdf.format(date));
		long time = date.getTime();
		Date beforeDate = new Date(time);
		String beforeString = sdf.format(beforeDate);
		System.out.println("beforeString:"+beforeString);
		String afterString = beforeString.replaceAll("\\d+\\.\\d+", "00.000");
		System.out.println("afterString:"+afterString);
		try {
			Date afterDate = sdf.parse(afterString);
			System.out.println("afterDate:"+sdf.format(afterDate));
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
